package com.ny.service;

import com.ny.entity.User;

import java.util.List;


public interface UserService {
    public List<User> findAllUser();
    public User login(String username, String password);
    public User findUserByUsername(String username);
    int registerUser(User user);
    //根据邮箱号查询用户数据
    User findUserByEmail(String email);
    // 发送邮箱验证码
    public void sendEmailCode(String email);
    int updatePasswordByEmail( String email,  String password);
    boolean checkCode(String email, String code);

    // 个人中心：修改密码
    boolean updatePasswordByUsername(String username, String oldPassword, String newPassword);
    
    // 个人中心：修改昵称
    boolean updateNicknameByUsername(String username, String nickname);
}